home *** CD-ROM | disk | FTP | other *** search
- unit Ressav;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, VBXCtrl, Hotmap, StdCtrls, Pict;
-
- type
- TfrResSav = class(TForm)
- HotMap1: THotMap;
- Memo1: TMemo;
- Edit1: TEdit;
- Edit2: TEdit;
- Label1: TLabel;
- Label2: TLabel;
- BiPict1: TBiPict;
- procedure FormCreate(Sender: TObject);
- procedure FormShow(Sender: TObject);
- procedure HotMap1RegionMouseDown(Sender: TObject;
- var RegionNum: Single; var Button: Integer);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- frResSav: TfrResSav;
-
- implementation
-
- {$R *.DFM}
-
- procedure TfrResSav.FormCreate(Sender: TObject);
- var DtFl: TVBString;
- begin
- Memo1.Text := 'HotMap saves Windows resources. ';
- Memo1.Text := Memo1.Text + 'In this demo ONE HotMap ';
- Memo1.Text := Memo1.Text + 'control replaces 21 Command ';
- Memo1.Text := Memo1.Text + 'Buttons. That saves you Windows ';
- Memo1.Text := Memo1.Text + 'resources and memory. HotMap control ';
- Memo1.Text := Memo1.Text + 'recognizes different mouse buttons. ';
- Memo1.Text := Memo1.Text + 'Click any button and Enjoy.';
-
- DtFl := 'TOOLS.HMD';
- HotMap1.DataFile := DtFl;
- HotMap1.Action := 4;
- { DtFl := 'USAMAP.BMP';
- HotMap1.BmpName := DtFl;}
- end;
-
- procedure TfrResSav.FormShow(Sender: TObject);
- begin
- HotMap1.FillType := 3;
- HotMap1.MouseCursor := BiPict1.Picture;
- HotMap1.MouseHotX := 31;
- HotMap1.MouseHotY := 11;
- end;
-
- procedure TfrResSav.HotMap1RegionMouseDown(Sender: TObject;
- var RegionNum: Single; var Button: Integer);
- var Rn: Integer;
- begin
-
- Rn := Round(RegionNum);
- If Rn > 0 Then
- Edit1.Text := IntToStr(Rn)
- Else
- Edit1.Text := '';
-
- Case Button of
- 0:
- Edit2.Text := 'Left';
- 1:
- Edit2.Text := 'Right';
- 2:
- Edit2.Text := 'Middle';
- end;
-
- end;
-
- end.
-